<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 6/19/21
 * Time: 11:50 AM
 */

namespace app\api\controller\v1;


use app\api\model\Product as ProductModel;
use app\api\model\StoreUser as StoreUserModel;
use app\api\model\User as UserModel;
use app\api\model\UserMoney as UserMoneyModel;
use app\api\model\UserTiMoneyOrder;
use think\facade\Log;

class Ceshi
{
    public function ceshi()
    {
        $time = time();
        $where[] = ['end_time','lt',$time];
        $where[] = ['up_down','eq',1];
        $select = ProductModel::where($where)->select()->toArray();
        foreach ($select as $k=>$v){
            $select[$k]['start_time'] = date('Y-m-d H:i:s',$v['start_time']);
            $select[$k]['end_time'] = date('Y-m-d H:i:s',$v['end_time']);
        }
        dump($select);
    }
}